package com.spirng;

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            while (true) {
                Thread.yield();

                // 响应中断
                if (Thread.currentThread().isInterrupted()) {
                    System.out.println("Java技术栈线程被中断，程序退出。");
                    return;
                }
            }
        });
        thread.start();
        thread.interrupt();
        boolean interrupted = thread.isInterrupted();
    }
    public static void  load(pre p){
        p.a=3;
        p.b="33";
        ArrayList<Integer> list = new ArrayList<>();
        list.add(3);
        p.list=list;
    }
}
class  pre{
    int a;
    String b;
    List<Integer> list;
}